package Demo01_15;

import java.util.ArrayList;

/**
 * Created by 14229 on 2020/1/16.
 */
public class Dog {
    private String name;//姓名
    private String color;//颜色
    private ArrayList<String> sons=new ArrayList<String>( );//孩子

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", color='" + color + '\'' +
                ", sons=" + sons +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public ArrayList<String> getSons() {
        return sons;
    }

    public void setSons(ArrayList<String> sons) {
        this.sons = sons;
    }

    public Dog(String name, String color, ArrayList<String> sons) {

        this.name = name;
        this.color = color;
        this.sons = sons;
    }

    public Dog() {

    }
}
